#pragma once

#ifdef DM_PLATFORM_WINDOWS
	#ifdef DM_DYNAMIC_BUILD
		#ifdef DM_BUILD_DLL
			#define DM_API __declspec(dllexport)
		#else
			#define DM_API __declspec(dllimport)
		#endif // DM_BUILD_DLL
	#else
		#define DM_API 
	#endif // DM_DYNAMIC_BUILD
#else 
	#error DM only supports windows!
#endif

#ifdef DM_ENABLE_ASSERTS
	#define DM_ASSERT(x, ...)  {if (!(x)) {DM_ERROR("Assertion Failed: {0}", __VA_ARGS__);__debugbreak(); } }
	#define DM_CORE_ASSERT(x, ...)  {if (!(x)) {DM_CORE_ERROR("Assertion Failed: {0}", __VA_ARGS__);__debugbreak(); } }
#else
	#define DM_ASSERT(x, ...) 
	#define DM_CORE_ASSERT(x, ...)
#endif // DM_ENABLE_ASSERTS

 
#define BIT(x) (1 << x)
#define BIND_EVENT_FN(x) std::bind(&x, this, std::placeholders::_1)